package cxf.bean;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;

@XmlRootElement(name = "ArrayBean")
@XmlAccessorType(XmlAccessType.FIELD)
public class ArrayBean {
	private String name;
	private List<SimpleBean> beans;
	
	public ArrayBean() {
		this.name = "array bean";
		this.beans = new ArrayList<SimpleBean>();
		for (int i = 0; i < 3; i++)
		{
			SimpleBean bean = new SimpleBean();
			bean.setName("name" + i);
			bean.setAge(i);
			beans.add(bean);
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<SimpleBean> getBeans() {
		return beans;
	}

	public void setBeans(List<SimpleBean> beans) {
		this.beans = beans;
	}
	
}
